FROM php:7.1-cli

COPY ./composer.phar /usr/local/bin/composer

#更新apt-get源 使用163的源
RUN mv /etc/apt/sources.list /etc/apt/sources.list.bak && \
    echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib" >/etc/apt/sources.list && \
    echo "deb http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list && \
    echo "deb-src http://mirrors.163.com/debian/ jessie main non-free contrib" >>/etc/apt/sources.list && \
    echo "deb-src http://mirrors.163.com/debian/ jessie-proposed-updates main non-free contrib" >>/etc/apt/sources.list

RUN apt-get update && apt-get install -y git \
    && chmod 755 /usr/local/bin/composer

## useradd -d "/home/wxm" -m -s "/bin/bash" wxm && su wxm && composer config -g repo.packagist composer https://packagist.phpcomposer.com